package ictbk.ttmk51.grapro.app.safephonebook;

public class Phone {

	private String number;
	private int type;
	
	public static final int TYPE_FAX_WORK = 4;
	public static final int TYPE_FAX_HOME = 5;
	public static final int TYPE_CUSTOM = 0;
	public static final int TYPE_OTHER_FAX = 13;
	public static final int TYPE_HOME = 1;
	public static final int TYPE_MOBILE = 2;
	public static final int TYPE_WORK = 3;
	public static final int TYPE_OTHER = 7;
	public static final int TYPE_PAGER = 6;
	public static final int TYPE_CALL_BACK = 8;
	public static final int TYPE_CAR = 9;
	public static final int TYPE_COMPANY_MAIN = 10;
	public static final int TYPE_ISDN = 11;
	public static final int TYPE_MAIN = 12;
	public static final int TYPE_RADIO = 14;
	public static final int TYPE_TELEX = 15;
	public static final int TYPE_TTY_TDD = 16;
	public static final int TYPE_WORK_PAGER = 18;
	public static final int TYPE_MMS = 20;

	public Phone(String n, int t) {
		this.number = n;
		this.type = t;
	}
	
	public Phone(){}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public int getType() {
		return type;
	}

	public String getTypeName() {		
		switch (type) {
		case TYPE_CUSTOM:
			return "Phone Custom";
		case TYPE_HOME:
			return "Phone Home";
		case TYPE_MOBILE:
			return "Phone Mobile";
		case TYPE_WORK:
			return "Phone Word";
		case TYPE_FAX_WORK:
			return "Work Fax";
		case TYPE_FAX_HOME:
			return "Home Fax";
		case TYPE_PAGER:
			return "Pager";
		case TYPE_MMS:
			return "MMS";
		case TYPE_WORK_PAGER:
			return "Work Pager";
		case TYPE_TTY_TDD:
			return "TTY TDD";
		case TYPE_TELEX:
			return "Telex";
		case TYPE_RADIO:
			return "Radio";
		case TYPE_MAIN:
			return "Main";
		case TYPE_ISDN:
			return "ISDN";
		case TYPE_COMPANY_MAIN:
			return "Main Company";
		case TYPE_CAR:
			return "Car";
		case TYPE_CALL_BACK:
			return "Call Back";
		case TYPE_OTHER:
			return "Other";
		}
		return "Unknow";
	}

	public void setType(int type) {
		this.type = type;
	}
}
